#ifndef AFX_CWND_H
#define AFX_CWND_H

#include "CMsg.h"

class CWnd : public CMsg {
  public:
    HWND Create(LPCTSTR lpTitle, DWORD dwStyle = WS_OVERLAPPEDWINDOW |
        WS_VISIBLE, int x = CW_USEDEFAULT, int y = CW_USEDEFAULT,
        int w = CW_USEDEFAULT, int h = CW_USEDEFAULT, HWND hParent = NULL,
        HMENU hMenu = NULL, LPVOID * lpParam = NULL);
    BOOL Destroy();
    BOOL  SetMenu(HMENU hMenu);
    HMENU GetMenu();
    BOOL GetMenuBarInfo(LONG idObject, LONG idItem, PMENUBARINFO pmbi);
    HDC  BeginPaint(LPPAINTSTRUCT lpPaint);
    BOOL EndPaint(LPPAINTSTRUCT lpPaint);
    BOOL GetWindowRect(LPRECT lpRect);
    BOOL GetClientRect(LPRECT lpRect);
    BOOL Show(int nCmdShow);
    BOOL Update();
    BOOL Move(int x, int y, int w, int h, BOOL bRepaint);
    UINT SetTimer(UINT nIDEvent, UINT uElapse, TIMERPROC lpTimerFunc);
    BOOL KillTimer(UINT nIDEvent);
  protected:
    virtual LRESULT OnCreate(LPCREATESTRUCT lpCreateStruct);
    virtual LRESULT OnDestroy();
    virtual LRESULT OnClose();
    virtual LRESULT OnEnable(BOOL bEnabled);
    virtual LRESULT OnCommand(INT nSource, INT nID, HWND hCtrl);
    virtual LRESULT OnNotify(INT nID, LPNMHDR pNMH);
    virtual LRESULT OnShow(BOOL bShow, DWORD dwStatus);
    virtual LRESULT OnMove(INT x, INT y);
    virtual LRESULT OnMoving(LPRECT lpRect);
    virtual LRESULT OnSize(UINT uType, INT nWidth, INT nHeight);
    virtual LRESULT OnSizing(UINT uType, LPRECT lpRect);
    virtual LRESULT OnPaint(HDC hDC);
    virtual LRESULT OnErase(HDC hDC);
    virtual LRESULT OnEnterSizeMove();
    virtual LRESULT OnExitSizeMove();
    virtual LRESULT OnSetFocus(HWND hOldWnd);
    virtual LRESULT OnKillFocus(HWND hNewWnd);
    virtual LRESULT OnTimer(UINT nID, TIMERPROC lpTimerProc);
    virtual LRESULT OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
    virtual LRESULT OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
    virtual LRESULT OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
    virtual LRESULT OnSysKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
    virtual LRESULT OnSysKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
    virtual LRESULT OnLButtonDown(UINT nFlags, POINT point);
    virtual LRESULT OnLButtonUp(UINT nFlags, POINT point);
    virtual LRESULT OnLButtonDblClk(UINT nFlags, POINT point);
    virtual LRESULT OnMButtonDown(UINT nFlags, POINT point);
    virtual LRESULT OnMButtonUp(UINT nFlags, POINT point);
    virtual LRESULT OnMButtonDblClk(UINT nFlags, POINT point);
    virtual LRESULT OnRButtonDown(UINT nFlags, POINT point);
    virtual LRESULT OnRButtonUp(UINT nFlags, POINT point);
    virtual LRESULT OnRButtonDblClk(UINT nFlags, POINT point);
    virtual LRESULT OnMouseMove(UINT nFlags, POINT point);
    virtual LRESULT OnMouseWheel(UINT nFlags, SHORT nDelta, POINT point);
    virtual LRESULT OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
};

#endif
